<!DOCTYPE html>
<html class="no-js" lang="">

<head>
    #include( "/public-head.html")
</head>

<body style="background-color: #ffffff !important;">
<!-- main area -->
<div class="main-content checkbo">
    <div class="panel mb25">
        <div class="panel-heading border">
            #if($!{album.albumId}) 修改#else 添加#end专辑
        </div>
        <div class="panel-body">
            <div class="row no-margin">
                <div class="col-lg-12">
                    <form action="/vrs/album/edit.jsn" method="post" data-url="/vrs/album/golist.html" id="commentForm" name="ajaxForm" class="form-horizontal bordered-group" role="form">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">专辑id</label>
                            <div class="col-sm-10">
                                <input type="text" name="album.albumId"  value="$!{album.albumId}" class="hidden" >
                                <input type="text"  class="form-control w100" value="$!{album.albumId}" placeholder="专辑id" disabled="">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">所属频道<code>*</code></label>
                            <div class="col-sm-10">
                                <select id="channelSelect" required data-placeholder="请选择频道" class="chosen w150" name="album.channel.channelId">
                                    <option value=""></option>
                                    #if($channelList)
                                        #foreach( $row in $!{channelList})
                                        <option value="$!{row.channelId}">$!{row.name}</option>
                                        #end
                                    #end
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">专辑名称<code>*</code></label>
                            <div class="col-sm-10">
                                <input type="text" required name="album.name" value="$!{album.name}" class="form-control w250" placeholder="专辑名称">
                            </div>
                        </div>

                        <textarea id="standardPic"  name="album.standardPic" rows="5" cols="100" class="hidden">$!{album.standardPic}</textarea>
                        <textarea id="starringInfo" name="album.starringInfo" rows="5" cols="100" class="hidden">$!{album.starringInfo}</textarea>
                        <textarea id="starringIds" name="album.starringIds" rows="5" cols="100" class="hidden"></textarea>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">专辑配图<code>*</code></label>
                            <div id="picDiv" class="col-sm-10" data-theme-name="upload-image">
                                <div  data-theme-name="upload-image-div" class="pull-left" >
                                    <div class="pull-left mr10">
                                        <select data-placeholder="请选择终端" required data-theme-name="terminal" name="albumTerminals" class="chosen w100" >
                                            <option value="3">Mobile</option>
                                            <option value="1">TV&OTT</option>
                                            <option value="2">PC</option>
                                            <option value="4">pad</option>
                                        </select><br/>
                                        <button type="button" class="btn btn-danger" data-theme-name="remove-upload-image" >删除</button>
                                    </div>
                                    <div class="pull-left mr10">
                                        <!--<img src="/images/upload_1242x416.jpg" width="248" height="82">-->
                                        <label data-theme-name="upload-image-label">
                                            <img src="/images/upload_1242x416.jpg" name="" required data-theme-name="view-image" width="248" height="82">
                                            <img src="/images/wait.gif" width="40" height="40" data-theme-name="wait-image" >
                                            <input type="file" name="image"  />
                                            <input name="root" value="album" style="display: none"  />
                                        </label>
                                    </div>
                                </div>
                                <div class="pull-left mr10">
                                    <button type="button" class="btn btn-primary" data-theme-name="add-upload-image" >添<br/>加</button>
                                </div>
                            </div>
                        </div>

                        <div id="starrPicDiv" class="form-group" data-theme-name="starr-div">
                            <label class="col-sm-2 control-label">艺人及配图<code>*</code></label>
                            <label class="col-sm-2 control-label hidden"></label>
                            <div class="col-sm-10" data-theme-name="starr-sub-div">
                                <div  class="mb15" style="">
                                    <select data-placeholder="请选择艺人" required name="album.standardPicId" class="chosen w150 " >
                                        <option value=""></option>
                                        #if($starringList)
                                        #foreach( $row in $!{starringList})
                                        <option value="$!{row.starringId}">$!{row.name}</option>
                                        #end
                                        #end
                                    </select>
                                    <button type="button" class="btn btn-danger w150 ml10" data-theme-name="remove-starr" >删除艺人</button>
                                </div>
                                <div  data-theme-name="upload-image-div" class="pull-left" >
                                    <div class="pull-left mr10">
                                        <select data-placeholder="请选择终端" required data-theme-name="terminal" class="chosen w100" >
                                            <option value="3">Mobile</option>
                                            <option value="1">TV&OTT</option>
                                            <option value="2">PC</option>
                                            <option value="4">pad</option>
                                        </select><br/>
                                        <button type="button" class="btn btn-danger" data-theme-name="remove-upload-image" >删除</button>
                                    </div>
                                    <div class="pull-left mr10">
                                        <label data-theme-name="upload-image-label">
                                            <img src="/images/upload_1242x416.jpg" data-theme-name="view-image" name="" width="248" height="82">
                                            <img src="/images/wait.gif" width="40" data-theme-name="wait-image" height="40">
                                            <input type="file"  name="image" />
                                            <input name="root" value="album" style="display: none"  />
                                        </label>
                                    </div>

                                </div>
                                <div class="pull-left mr10">
                                    <button type="button" class="btn btn-primary" data-theme-name="add-upload-image" >添<br/>加</button>
                                </div>
                            </div>

                            <label class="col-sm-2 control-label"></label>
                            <div class="col-sm-10">
                                <button type="button" class="btn btn-info w150" data-theme-name="add-starr" >添加艺人</button>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">年代<code>*</code></label>
                            <div class="col-sm-10">
                                <select id="yearSelect" required data-placeholder="请选择年代" class="chosen w150" name="album.age">
                                    <option value=""></option>
                                    #if($yearList)
                                        #foreach( $row in $!{yearList})
                                        <option value="$!{row.id}">$!{row.name}</option>
                                        #end
                                    #end
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">版权<code>*</code></label>
                            <div class="col-sm-10">
                                <select id="copyrightSelect" required data-placeholder="请选择版权" class="chosen w150" name="album.copyrightCompeny.copyrightCompanyId">
                                    <option value=""></option>
                                    #if($copyrightCompanyList)
                                        #foreach( $row in $!{copyrightCompanyList})
                                        <option value="$!{row.copyrightCompanyId}">$!{row.name}</option>
                                        #end
                                    #end
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">地区<code>*</code></label>
                            <div id="areaRadio" class="col-sm-10">
                            #if($areaList)
                                #foreach( $row in $!{areaList})
                                <label class="cb-radio">
                                    <input type="radio" required name="album.area.areaId" value="$!{row.areaId}" />$!{row.country}
                                </label>
                                #end
                            #end
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">是否完结<code>*</code></label>
                            <div id="isendRadio" class="col-sm-10">
                                <label class="cb-radio">
                                    <input type="radio" required name="album.isend" value="1" />完结
                                </label>
                                <label class="cb-radio">
                                    <input type="radio" required name="album.isend" value="0" />没有
                                </label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">是否上线<code>*</code></label>
                            <div id="isDisplayRadio" class="col-sm-10">
                                <label class="cb-radio">
                                    <input type="radio" required name="album.isdisplay" value="1" />上线
                                </label>
                                <label class="cb-radio">
                                    <input type="radio" required name="album.isdisplay" value="0" />下线
                                </label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">分类<code>*</code></label>
                            <div class="col-sm-10">
                                <select id="categorySelect" required data-placeholder="请选择分类" multiple class="chosen" name="album.categoryIds" style="width: 60%;">
                                    <option value=""></option>
                                    #if($categoryList)
                                        #foreach( $row in $!{categoryList})
                                        <option value="$!{row.categoryId}">$!{row.name}</option>
                                        #end
                                    #end
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">评分</label>
                            <div class="col-sm-10">
                                <input type="text" name="album.score" value="$!{album.score}" class="form-control w100" placeholder="评分" >
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">开始时间</label>
                            <div class="col-sm-9">
                                <div class="pull-left " style="margin-right: 20px;">

                                    <input id="showtimes" type="text"  class="form-control mb25 w200 vrs-date" value="$!{album.showtimes}"  data-provide="datepicker" style="">
                                    <input  type="text"  class="hidden vrs-date-submit" value="$!{album.showtimes}"   name="album.showtimes" ><!--data-date-format="yyyy-mm-dd"-->
                                </div>
                                <div class="pull-left">
                                    <div class="input-group input-group-lg clockpicker w200" style="float: left">
                                        <input type="text" class="form-control vrs-time"  value="">
                                        <span class="input-group-addon">
                                            <span class="fa fa-clock-o"></span>
                                        </span>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--<div class="form-group">
                            <label class="col-sm-2 control-label">结束时间</label>
                            <div class="col-sm-9">
                                <div class="pull-left " style="margin-right: 20px;">
                                    <input type="text" class="form-control mb25 w200 vrs-date"  name="" data-provide="datepicker" style="">
                                </div>
                                <div class="pull-left">
                                    <div class="input-group input-group-lg clockpicker w200" style="float: left">
                                        <input type="text" class="form-control vrs-time"  value="">
                                        <span class="input-group-addon">
                                            <span class="fa fa-clock-o"></span>
                                        </span>
                                    </div>
                                </div>
                            </div>
                        </div>-->

                        <div class="form-group">
                            <label class="col-sm-2 control-label">标签<code>*</code></label>
                            <div class="col-sm-10">
                                <input id="tags" type="text" required name="album.tag" data-decimals="每输入一个标签回车结束" value="" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">简介</label>
                            <div class="col-sm-10">
                                <textarea class="form-control" id="description"  name="album.description" rows="3">$!{album.description}</textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label></label>
                            <div>
                                <button type="button" class="btn btn-primary mr10 submit">#if($!{album.albumId}) 修改#else 添加#end</button>
                                <button class="btn btn-default">返回</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>


</div>
<!-- /main area -->

#include( "/public-script.html")
#include( "/sub-script.html")
<script>
    //单选
    initEditSelect('yearSelect','$!{album.age}');
    initEditSelect('channelSelect','$!{album.channel.channelId}');
    initEditSelect('copyrightSelect','$!{album.copyrightCompeny.copyrightCompanyId}');
    //radio
    initEditRadio('areaRadio','$!{album.area.areaId}')
    initEditRadio('isendRadio','$!{album.isend}')
    initEditRadio('isDisplayRadio','$!{album.isdisplay}')
    //多选
    initEditSomeSelect('categorySelect','$!{album.categoryIds}');
    //输入框
    initEditInput('tags','$!{album.tag}')
    //配图
    initEditPic('picDiv','$!{album.standardPic}')
    initEditStarrData('starrPicDiv','$!{album.starringInfo}')
    //时间
    initEditTime('showtimes','$!{album.showtimes}')

</script>
</body>

</html>
